var one = document.querySelectorAll(".tab-list li");
var two = document.querySelectorAll(".tab-content li");
//给元素编号
for (var i = 0; i < one.length; i++) {
    one[i].index = i; //index是自定义属性，用来保存编号                 
    one[i].onmouseover = function () {
        for (var i = 0; i < two.length; i++) {
            two[i].style.display = "none"; //先将内容全部隐藏                  
        }
        two[this.index].style.display = "block"; //当鼠标触发时再显示对应的内容    
        for (var i = 0; i < one.length; i++) {
            //  one[i].style.background="none";        //将背景色设置为无                 
        }
        //  one[this.index].style.background="indianred";//切换鼠标接入按钮背景颜色
    };
};